home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of MacTutor - S…e Code for Volumes 1 to 5
/
The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin
/
Source Code
/
#46 (Jul 89)
/
Window Menu Code
/
Window.r
< prev
Wrap
Text File
|
1989-01-19
|
10KB
|
342 lines
/*******************************************************************
Window.r
Resources for dynamic Window menu demo.
(c) 1988, by Clifford Story & Attic Software
*******************************************************************/
#include "types.r"
/*******************************************************************
Menu resources:
---------------
A comment: the Window menu is declared here, even though the
MDEF never references the declaration, so MenuKey can find the
keyboard equivalent for the “Zoom Front Window” command.
*******************************************************************/
resource 'MENU' (1001) {
1001,
textMenuProc,
$7FFFFFFB,
enabled,
apple,
{ /* array: 3 elements */
/* [1] */
"About Window...", noicon, "", "", plain,
/* [2] */
"About Attic Software...", noicon, "", "", plain,
/* [3] */
"-", noIcon, "", "", plain
}
};
resource 'MENU' (1002, preload) {
1002,
textMenuProc,
0x7FFFFFFB,
enabled,
"File",
{ /* array: 4 elements */
/* [1] */
"New", noIcon, "N", "", plain,
/* [2] */
"Close", noIcon, "K", "", plain,
/* [3] */
"-", noIcon, "", "", plain,
/* [4] */
"Quit", noIcon, "Q", "", plain
}
};
resource 'MENU' (1003, preload) {
1003,
textMenuProc,
0x7FFFFFFD,
enabled,
"Edit",
{ /* array: 6 elements */
/* [1] */
"Undo", noIcon, "Z", "", plain,
/* [2] */
"-", noIcon, "", "", plain,
/* [3] */
"Cut", noIcon, "X", "", plain,
/* [4] */
"Copy", noIcon, "C", "", plain,
/* [5] */
"Paste", noIcon, "V", "", plain,
/* [6] */
"Clear", noIcon, "", "", plain
}
};
resource 'MENU' (1004, preload) {
1004,
1001,
0x7FFFFFFC,
enabled,
"Window",
{ /* array: 2 elements */
/* [1] */
"Zoom Front Window", noIcon, "W", "", plain,
/* [2] */
"-", noIcon, "", "", plain
}
};
/*******************************************************************
Picture resources
*******************************************************************/
resource 'PICT' (1001, "About", purgeable) {
1163,
{7, 7, 307, 498},
$"1101 A000 82A0 008C 0100 0A00 0700 0701"
$"3301 F20A 0000 0000 0000 0000 0B00 1B00"
$"1B44 0009 0009 0131 01F0 0700 0200 0248"
$"A100 9600 0605 0000 0002 03A1 009A 0008"
$"004C 0000 00D8 0000 A000 9803 0003 0D00"
$"0C2B 2353 2257 696E 646F 7720 6465 6D6F"
$"6E73 7472 6174 6573 2061 2064 796E 616D"
$"6963 2057 696E 6429 ED1D 6F77 206D 656E"
$"752E 2020 4561 6368 2074 696D 6520 6120"
$"7769 6E64 6F77 0DA0 0099 A100 9A00 0800"
$"3C00 0000 D800 00A0 0098 2800 6300 2322"
$"6973 206F 7065 6E65 6420 6F72 2063 6C6F"
$"7365 642C 206F 7220 7468 6520 7769 6E64"
$"6F77 29D8 1C20 6F72 6465 7220 6368 616E"
$"6765 732C 2074 6865 206D 656E 7520 6973"
$"0DA0 0099 A100 9A00 0800 2C00 0000 D800"
$"00A0 0098 2800 7300 2322 6175 746F 6D61"
$"7469 6361 6C6C 7920 7570 6461 7465 6420"
$"746F 2072 6566 6C65 6374 2074 29D6 1E68"
$"6520 6E65 7720 7769 6E64 6F77 206F 7264"
$"6572 2C20 7769 7468 2074 6865 0DA0 0099"
$"A100 9A00 0800 1C00 0000 D800 00A0 0098"
$"2800 8300 2322 746F 7020 7769 6E64 6F77"
$"2061 7420 7468 6520 746F 7020 6F66 2074"
$"6865 206D 656E 752C 29DA 2220 616E 6420"
$"736F 206F 6E2E 2020 5468 6973 2069 7320"
$"616C 6C20 646F 6E65 2062 7920 7429 C403"
$"6865 0DA0 0099 A100 9A00 0800 0C00 0000"
$"D800 00A0 0098 2800 9300 2322 4D44 4546"
$"3B20 7468 6520 7072 6F67 7261 6D20 6974"
$"7365 6C66 206E 6565 6420 6E6F 7420 29D6"
$"1E62 6520 636F 6E63 6572 6E65 6420 7769"
$"7468 206D 6169 6E74 6169 6E69 6E67 0DA0"
$"0099 A100 9A00 08FF FC00 0000 D800 00A0"
$"0098 2800 A300 230A 7468 6520 6D65 6E75"
$"2E0D A000 99A1 009A 0008 FFEC 0000 00D8"
$"0000 A000 982A 1001 0DA0 0099 A100 9A00"
$"08FF DC00 0000 D800 00A0 0098 2A10 2259"
$"6F75 2063 616E 2061 6464 2074 6869 7320"
$"6D65 6E75 2074 6F20 796F 7572 206F 776E"
$"2029 D91F 7072 6F67 7261 6D73 2062 7920"
$"7369 6D70 6C79 2063 6F70 7969 6E67 2074"
$"6865 0DA0 0099 A100 9A00 08FF CC00 0000"
$"D800 00A0 0098 2800 D300 2322 4D44 4546"
$"2072 6573 6F75 7263 6520 7769 7468 2052"
$"6573 6564 6974 2E20 2041 6E20 6172 29D9"
$"2174 6963 6C65 206F 6E20 7468 6973 2070"
$"726F 6772 616D 2C20 696E 636C 7564 696E"
$"670D A000 99A1 009A 0008 FFBC 0000 00D8"
$"0000 A000 9828 00E3 0023 2263 6F6D 706C"
$"6574 6520 5061 7363 616C 2073 6F75 7263"
$"6520 636F 6465 2C20 6861 7320 6229 DB1F"
$"6565 6E20 7375 626D 6974 7465 6420 746F"
$"204D 6163 2054 7574 6F72 2028 6966 0DA0"
$"0099 A100 9A00 08FF AC00 0000 D800 00A0"
$"0098 2800 F300 2322 6974 2064 6F65 736E"
$"2774 2067 6574 2070 7562 6C69 7368 6564"
$"2C20 4927 6C6C 2072 656C 29C2 1865 6173"
$"6520 7468 6520 736F 7572 6365 206D 7973"
$"656C 6629 2EA0 0099 A000 97A1 0096 0006"
$"0600 0000 0203 A100 9A00 08FF FA00 0000"
$"2500 00A0 0098 0405 0D00 1228 002C 00D9"
$"0657 696E 646F 77A0 0099 A000 97A1 0096"
$"0006 0600 0000 0203 A100 9A00 08FF FC00"
$"0000 D600 00A0 0098 0400 0D00 0928 0122"
$"0026 22A9 2031 3938 382C 2031 3938 3920"
$"6279 2043 6C69 6666 6F72 6420 5374 6F72"
$"7920 616E 6429 A622 2041 7474 6963 2053"
$"6F66 7477 6172 652C 2050 2E4F 2E20 426F"
$"7820 3231 392C 2047 6F6C 299E 1765 7461"
$"2C20 4361 6C69 666F 726E 6961 2020 2039"
$"3331 3136 A000 99A0 0097 A000 8DA0 0083"
$"FF"
};
resource 'PICT' (1002, "Attic", purgeable) {
1131,
{7, 7, 307, 498},
$"1101 A000 82A0 008C 0100 0A00 0700 0701"
$"3301 F20A 0000 0000 0000 0000 0B00 1B00"
$"1B44 0009 0009 0131 01F0 0700 0200 0248"
$"A100 9600 0606 0000 0002 03A1 009A 0008"
$"FFFA 0000 004B 0000 A000 9803 0003 0405"
$"0D00 122B BB2C 0E41 7474 6963 2053 6F66"
$"7477 6172 65A0 0099 A000 97A1 0096 0006"
$"0500 0000 0203 A100 9A00 0800 5C00 0000"
$"E600 00A0 0098 0400 0D00 0C28 004E 001E"
$"2241 7474 6963 2053 6F66 7477 6172 6520"
$"6973 2061 2073 6D61 6C6C 204D 6163 696E"
$"746F 7329 DC22 6820 7072 6F67 7261 6D6D"
$"696E 6720 636F 6D70 616E 792E 2069 6E20"
$"6275 7369 6E65 7373 29E2 010D A000 99A1"
$"009A 0008 004C 0000 00E6 0000 A000 9828"
$"005E 001E 2273 696E 6365 2031 3938 362E"
$"2020 5765 2064 6F20 6120 7661 7269 6574"
$"7920 6F66 2077 6F29 D722 726B 3B20 D249"
$"6465 616C 696E 6572 D32C 2061 2073 6861"
$"7265 7761 7265 206F 7574 6C69 29D1 056E"
$"6572 2C0D A000 99A1 009A 0008 003C 0000"
$"00E6 0000 A000 9828 006E 001E 2269 7320"
$"6F75 7220 6265 7374 2D6B 6E6F 776E 2070"
$"726F 6475 6374 2E20 2057 6520 616C 7329"
$"D81B 6F20 646F 2063 6F6E 7472 6163 7420"
$"7072 6F67 7261 6D6D 696E 672E 0DA0 0099"
$"A100 9A00 0800 2C00 0000 E600 00A0 0098"
$"2800 7E00 1E01 0DA0 0099 A100 9A00 0800"
$"1C00 0000 E600 00A0 0098 2A10 1E57 6520"
$"6361 6E20 6265 2072 6561 6368 6564 2062"
$"7920 6D61 696C 2061 743A 0DA0 0099 A100"
$"9A00 0800 0C00 0000 E600 00A0 0098 2A10"
$"010D A000 99A1 009A 0008 FFFC 0000 00E6"
$"0000 A000 982A 1022 2020 2020 2020 2020"
$"2020 2020 2020 2020 2020 2020 2020 2020"
$"2020 2020 2020 2041 7474 2991 0C69 6320"
$"536F 6674 7761 7265 0DA0 0099 A100 9A00"
$"08FF EC00 0000 E600 00A0 0098 2800 BE00"
$"1E22 2020 2020 2020 2020 2020 2020 2020"
$"2020 2020 2020 2020 2020 2020 2020 2020"
$"2050 2E4F 298F 0A2E 2042 6F78 2032 3139"
$"0DA0 0099 A100 9A00 08FF DC00 0000 E600"
$"00A0 0098 2800 CE00 1E22 2020 2020 2020"
$"2020 2020 2020 2020 2020 2020 2020 2020"
$"2020 2020 2020 2020 2047 6F6C 2990 1865"
$"7461 2C20 4361 6C69 666F 726E 6961 2020"
$"2039 3331 3136 0DA0 0099 A100 9A00 08FF"
$"CC00 0000 E600 00A0 0098 2800 DE00 1E01"
$"0DA0 0099 A100 9A00 08FF BC00 0000 E600"
$"00A0 0098 2A10 2257 6520 616C 736F 206F"
$"7065 7261 7465 2061 2062 756C 6C65 7469"
$"6E20 626F 6172 6420 7329 D422 7973 7465"
$"6D20 6174 2028 3830 3529 2036 3833 2D30"
$"3332 322C 2062 6574 7765 656E 2074 29E6"
$"0368 650D A000 99A1 009A 0008 FFAC 0000"
$"00E6 0000 A000 9828 00FE 001E 2268 6F75"
$"7273 206F 6620 363A 3030 2050 4D20 616E"
$"6420 323A 3030 2041 4D2C 2050 6163 6929"
$"D822 6669 6320 7469 6D65 2C20 7365 7665"
$"6E20 6461 7973 2061 2077 6565 6B2E 2020"
$"506C 6561 29D3 0373 650D A000 99A1 009A"
$"0008 FF9C 0000 00E6 0000 A000 9828 010E"
$"001E 1566 6565 6C20 6672 6565 2074 6F20"
$"6361 6C6C 2069 6E21 A000 99A0 0097 A100"
$"9600 0606 0000 0002 03A1 009A 0008 FFFC"
$"0000 0076 0000 A000 980D 0009 2B69 1722"
$"A920 3139 3838 2C20 3139 3839 2062 7920"
$"436C 6966 666F 7264 2053 746F 7279 2061"
$"6E64 29A6 0F20 4174 7469 6320 536F 6674"
$"7761 7265 A000 99A0 0097 A000 8DA0 0083"
$"FF"
};
/*******************************************************************
Alert resource
*******************************************************************/
resource 'ALRT' (1001, "Message", purgeable) {
{0, 0, 122, 300},
1001,
{ /* array: 4 elements */
/* [1] */
OK, visible, sound1,
/* [2] */
OK, visible, sound1,
/* [3] */
OK, visible, sound1,
/* [4] */
OK, visible, sound1
}
};
/*******************************************************************
Item list resource
*******************************************************************/
resource 'DITL' (1001, "Message", purgeable) {
{ /* array DITLarray: 2 elements */
/* [1] */
{92, 120, 112, 180},
Button {
enabled,
"OK"
},
/* [2] */
{10, 10, 74, 290},
StaticText {
disabled,
"Sorry! This program can open only 18 wi"
"ndows at one time (if it opened more, th"
"e menu would be too long for the screen)"
"."
}
}
};
/*******************************************************************
Window resources
*******************************************************************/
resource 'WIND' (1001, purgeable) {
{0, 0, 200, 320},
documentProc,
invisible,
goaway,
0x0,
"untitled"
};
resource 'WIND' (1002, purgeable) {
{0, 0, 200, 320},
zoomDocProc,
invisible,
-1,
0x0,
"untitled"
};
/*******************************************************************
Multifinder resource
*******************************************************************/
resource 'SIZE' (-1) {
saveScreen,
acceptSuspendResumeEvents,
enableOptionSwitch,
cannotBackground,
MultiFinderAware,
98304,
98304
};
/******************************************************************/